package com.transaction.manage.localMapper;

import com.transaction.manage.model.dto.Market;
import com.transaction.manage.model.vo.MarketVo;
import com.transaction.manage.myMapper.MyMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public interface MarketMapper extends MyMapper<Market> {

    void insertMarketList(@Param("marketList") List<Market> marketList);

    @Select("DELETE FROM market WHERE channel_code = #{channelCode} AND handle_date = #{handleDate} ")
    void deleteMarketByChannelAndHandleDate(@Param("channelCode") String channelCode,
                                            @Param("handleDate") String handleDate);

    List<MarketVo> selectMarketInfoList(@Param("channelCode") String channelCode,
                                        @Param("handleDate") String handleDate);

    void updateMarketFundStatus(@Param("list") List<MarketVo> list);

    List<LinkedHashMap<String, Object>> checkMarketFundNotMappingTaFund(@Param("channelCode") String channelCode,
                                                                        @Param("handleDate") String handleDate);

    List<Map<String, Object>> selectMarketWriteFileData(@Param("channelCode") String channelCode,
                                                        @Param("handleDate") String handleDate);
}